package model

import "gorm.io/gorm"

type Base struct {
	gorm.Model
	UserId int    `gorm:"type:int;not null;commit:'用户Id'"`
	Title  string `gorm:"type:varchar(150);not null;commit:'标题'"`
	Status int    `gorm:"type:int;not null;default:0;commit:'0-待审核,1-审核通过,2-审核失败'"`
}

func (b *Base) CreateBase(db *gorm.DB) error {
	err := db.Create(&b).Error
	return err
}
